package com.tarena.csmall.front.web.mapper;

import cn.tedu.mall.pojo.product.vo.AttributeStandardVO;
import java.util.List;
import org.apache.ibatis.annotations.Select;

public interface AttributeMapper {
    @Select("select pa.* from pms_spu ps\n" +
        "left join pms_category pc on ps.category_id=pc.id\n" +
        "left join pms_category_attribute_template pcat on pc.id=pcat.category_id\n" +
        "left join pms_attribute_template pat on pat.id=pcat.attribute_template_id\n" +
        "left join pms_attribute pa on pa.template_id=pat.id\n" +
        "where ps.id=#{spuId}")
    List<AttributeStandardVO> selectAttributesBySpuId(Long spuId);
}
